home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / mfrm240.zip / MM.DOC < prev    next >
Text File  |  1991-05-02  |  14KB  |  360 lines

  1. MM 2.4 - Mainframe Mania - 1 May 1991
  2.     A Utility to Convert Mainframe Data
  3. Handles zoned decimals, overpunch, and trailing signs.
  4.  
  5. (c) 1987-1991 by Ken Goosens
  6.  
  7. A utility to convert downloaded mainframe numeric data to a
  8. format that PC programs can read.
  9.  
  10. Answers to questions about MM, and the latest version, can be gotten
  11. from the bulletin board Your Place at 703-978-6360.
  12.  
  13. HISTORY OF CHANGES
  14.  
  15. Version 2.4 - Released 1 May 1991
  16.  
  17.    Speed increased when having runs of same values in the
  18.    same field.   Runs slightly slower when every consecutive
  19.    value in a field in the records changes.   On data with
  20.    signficant redundancy, easily get 40% in speed.
  21.  
  22.    Recompiled under Professional Basic 7.1.
  23.  
  24.    ZIP file renamed MFRMver rather than MMver because there were
  25.    too many conflicts for the name (Menu Master, etc.).
  26.  
  27. Version 2.3 - Released 2 March 1988
  28.  
  29.    Numbers converted from scientific notation could have
  30.    trailing zeros after a decimal point.   Now elminated.
  31.  
  32.    Verification added that each record really does end with
  33.    the stated record delimitor.  Processing halted if does
  34.    not.  This check can be effectively eliminated by declaring
  35.    all characters to be data with no record delimitor.  Check
  36.    applies to all but last record in the file.
  37.  
  38. Version 2.2
  39.  
  40.    Recompiled under QB 4.0.
  41.  
  42.    Three bug fixes.  (1)  Was not converting overstriked numbers
  43.    properly when the number completely filled the field, e.g.
  44.    in a field of length 5, "1000A" would convert to "1000"
  45.    rather than to "10001", whereas "01000A" would convert
  46.    properly.  (2) When running in single step mode, the
  47.    display for the number converted was not right when a
  48.    shorter number followed a longer.  (3) Was truncating the least
  49.    significant digits in some cases even though there was
  50.    room in the field.
  51.  
  52. Version 2.1
  53.  
  54.    Will no longer write out real numbers in scientific notation.
  55.    Occasionally, depending on the value, MM would write out a real
  56.    number in scientific notation.   For example, 2.1E-002 rather
  57.    than .021.   Very few PC programs can read scientific notation.
  58.    2.1 will check whether output is in scientific format and
  59.    convert the number to a standard decimal if necessary.  As
  60.    a side note, Turbo Basic is far more prone to write out in
  61.    scientific format that Microsoft QuickBasic.
  62.  
  63. Version 2.01 - Released Nov 21, 1987
  64.  
  65.    Treats a blank at the end of a numeric field the same
  66.    as a plus sign when looking for a trailing sign.  Some mainframe
  67.    programs in the trailing sign field will leave a blank rather than
  68.    a plus sign and only put in a negative sign.   Hence "0031 " is
  69.    treated as "+0031" in version 2.01, whereas in 2.00 it is treated
  70.    as is.  If you said the number had 1 decimal place, 2.00 returned
  71.    "   31" whereas 2.01 returns "  3.1".  Version 2.01 thus properly
  72.    adjusts where the decimal point is added when a number with a trailing
  73.    sign has a blank for the sign.
  74.  
  75.    Opening screen now shows format for invoking MM from DOS.
  76.  
  77.  
  78. DISTRIBUTION RIGHTS
  79.  
  80. Individuals as well as organizations and companies are free to use this
  81. program, so long as nothing is charged for the program.   The author
  82. does not ask for any payment for its use.   However, you are not free to
  83. use this program to make money, nor to sell the program, nor to base
  84. a commercial program on it, without the explicit consent of the author.
  85.  
  86.  
  87. FILE THAT SHOULD COME WITH THIS PROGRAM
  88.  
  89. MM.BAS - QuickBasic source code
  90. MM.EXE - Compiled, executable program
  91. MM.DOC - this documentation
  92. MM.ZON  - sample mainframe file to be converted
  93. CONV.TBL - specifics on how to read and convert mainframe data in MM.ZON
  94.  
  95.  
  96. WHAT DOES MM DO?
  97.  
  98. This is a routine whose only purpose is to take mainframe data and
  99. convert it to a form that PC's can process.  There are three persistent
  100. problems it solves:
  101.  
  102. o   mainframe is often stored with assumed decimal points ("zoned"
  103.     numbers)
  104.  
  105. o   mainframe data is often stored with the sign as an "overstrike"
  106.     on the last character.
  107.  
  108. o   signs are often stored as a trailing character after the number
  109.     rather than in front of the number.
  110.  
  111. These problems are both combined when mainframe data is generated in
  112. COBOL using signed numeric pictures where the sign is not a leading
  113. separate.  For example, in the picture S99V9(4) the S produces an
  114. "overpunch" on the last character, in which (going) back to card
  115. decks) the sign is "overpunced" over the numeric digit and the digits
  116. are not stored with a decimal point (the V is where is implied
  117. decimal goes).
  118.  
  119. Very few databases on PC's will properly interprete such "zoned" decimals
  120. and virtually none will handle the overstrike (it will appear to be
  121. non-numeric) or trailing sign.
  122.  
  123. What usually happens with zoned data is that divided by a power of
  124. ten to shift the decimal over, but there is no solution to the latter
  125. problem.
  126.  
  127. MM will handle zoned decimals, overpunches, and trailing signs, converting
  128. the data to a format virtually all data bases on PC's can interprete.  MM
  129. assumes that you already have the mainframe data on your PC as ascii text
  130. and simply want to convert it to a format other PC programs can process.
  131.  
  132.  
  133. HOW DOES MM WORK?
  134.  
  135. MM works by passing it necessary parameters in the DOS command line.
  136. The format is
  137.  
  138.    MM[/<options>] [file to edit] [output file] [conversion table]
  139.  
  140. where
  141.  
  142.      <options> are either nothing or B (for BATCH, default is non-batch),
  143.                or T (for TEST, default are non-test).
  144.  
  145.      <file to edit> is the name of the mainframe data file.  Default is
  146.                     MM.ZON.
  147.  
  148.      <output file> is the converted file.  Default is MM.DMZ.
  149.  
  150.      <conversion table> is the file name of the parameters the conversion
  151.                         uses.  Default is CONV.TBL.
  152.  
  153. The data file and output file can be the same, in which case MM will
  154. write the output to a temporary work file and after processing is
  155. done, delete the old file and rename the temporary file to the old
  156. name.
  157.  
  158. All parameters are optional and go to their default value if none is
  159. provided.  Note that to override the default on any parameter, the earlier
  160. ones must also be supplied.
  161.  
  162. MM will normally present a screen stating what it will do and let you
  163. abort the job or run it.  However, if you want to run totally batch and
  164. bypass the confirmation, add "/B" to the command line.  "/B" can be anywhere
  165. in the DOS command line but the other parameter must occur in the stated
  166. order.
  167.  
  168. In TEST mode, MM will display each field in each record that it processes
  169. along with what it converted it to, and ask the user whether he wants
  170. to abort the processing, continue a field at a time, or go non-stop
  171. without displaying the fields and their values.  TEST is useful for
  172. determining whether the conversion table is set up properly and whether
  173. the processing is going as expected.   Single stepping through the
  174. conversion is too slow for normal processing.  Users should either
  175. abort the process if it is apparent that it is not working properly
  176. or go non-stop when satisfied that the conversion does work.
  177.  
  178. Note:  running batch in compatible with running test and will override
  179. it.
  180.  
  181. Examples:
  182.  
  183.           MM                            Execute MM taking all defaults
  184.  
  185.           MM FILE.IN FILE.OUT CONV.MM  Convert file FILE.IN, write out as
  186.                                           FILE.OUT, get conversion specifics
  187.                                           from file CONV.MM.
  188.  
  189.           MM/B TURNER.113 TURNER.DMZ   Convert file TURNER.113 to TURNER.DMZ
  190.                                           (using CONV.TBL for specifics).  Run
  191.                                           batch - do not ask for confirmation
  192.                                           on parameters.
  193.  
  194.           MM/T D:\IRMA\PAYROLL         Convert file D:\IRMA\PAYROLL to
  195.                                           MM.DMZ using CONV.TBL.  Display
  196.                                           the conversions for each field
  197.                                           and wait for instructi